package com.group2.view;
import static model.netBase.IP;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import model.*;
public class ShopMainFrame_Admin extends JFrame {

	JPanel panel = new JPanel(null);// 第一个JPanel
	Font d = new Font("黑体", Font.BOLD, 25);
	Font f = new Font("黑体", Font.PLAIN, 15);
	Font sm= new Font("黑体", Font.PLAIN, 21);
	JLabel shopicon = new JLabel();
	JLabel intro = new JLabel("苏猫超市欢迎您");
	JLabel smile =new JLabel("(*^▽^*)");
	
	//public JFrame index;
	

	public ShopMainFrame_Admin() {
		init();

	}

	private void init() {
		this.setTitle("欢迎来到苏猫超市");
		// 设置框架大小及位置
		this.setSize(500, 500);
		this.setResizable(false);
		//this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		

		JButton reset = new JButton("进入商店管理系统");
		reset.setFocusPainted(false);
		
		panel.setBounds(0, 0, 500, 500);
		panel.setBackground(Color.white);

		intro.setBounds(150, 200, 220, 50);
		intro.setFont(d);	

		reset.setBounds(148, 307, 176, 40);
		reset.setIcon(new javax.swing.ImageIcon(UserLogOnFrame.class.getResource("/images/login.png")));
		reset.setFont(f);

		panel.add(intro);
		
		shopicon.setBounds(135,63,250,190);
		shopicon.setIcon(new javax.swing.ImageIcon(UserLogOnFrame.class.getResource("/images/SuMao.png")));
		smile.setBounds(200, 240, 100,73);
		smile.setFont(sm);
		panel.add(smile);
		panel.add(shopicon);
		
		panel.add(reset);
		//panel.setBackground(Color.black);

		reset.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				// TODO 自动生成的方法存根
				new ShopShowFrame_Admin().setVisible(true);
			}
		});
		

		this.getContentPane().add(panel);// 将panel放入jframe界面
		this.setVisible(true);
		this.setLocationRelativeTo(null);

	}

	public static void main(String[] args) {
		new ShopMainFrame_Admin();

	}

}